﻿@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    layui.use(['jquery', 'form', 'laydate', 'common', 'optimizeSelectOption'], function () {
        var form = layui.form,
            $ = layui.$,
            common = layui.common,
            laydate = layui.laydate;
        var keyValue = $.request("keyValue");
        //权限字段
        common.authorizeFields('adminform');
        //执行一个laydate实例
        laydate.render({
            elem: '#F_Birthday'
            , btns: ['clear', 'now']
            , trigger: 'click',
            format: 'yyyy-MM-dd',
        });
        function initControl() {
            $("#F_OrganizeId").bindSelect({
                url: "/SystemOrganize/SystemSet/GetListJson",
                id: "F_Id",
                text: "F_CompanyName"
            });
            $("#F_DutyId").bindSelect({
                url: "/SystemOrganize/Duty/GetListJson",
                id: "F_Id",
                text: "F_FullName"
            });
        }
        $(function () {
            initControl();
            common.ajax({
                url: "/SystemOrganize/User/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    common.val('adminform', data);
                    common.setReadOnly('adminform');
                    $("#F_UserPassword").val("******").attr('disabled', 'disabled');
                    form.render();
                }
            });
        });
        wcLoading.close();
    });
</script>
<body>
    <div class="layuimini-container ">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item ">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">账号</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_Account" name="F_Account" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-block">
                            <input type="password" id="F_UserPassword" name="F_UserPassword" lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">公司</label>
                        <div class="layui-input-block">
                            <select id="F_OrganizeId" name="F_OrganizeId" lay-verify="required" lay-search="">
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">部门</label>
                        <div class="layui-input-block">
                            <input id="F_DepartmentName" name="F_DepartmentName" type="text" lay-verify="required" maxlength="50" autocomplete="off" class="layui-input" onclick="search('部门')" />
                            <input id="F_DepartmentId" name="F_DepartmentId" type="text" hidden />
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">角色</label>
                        <div class="layui-input-block">
                            <input id="F_RoleName" name="F_RoleName" type="text" lay-verify="required" maxlength="50" autocomplete="off" class="layui-input" onclick="search('角色')" />
                            <input id="F_RoleId" name="F_RoleId" type="text" hidden />
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6">
                        <label class="layui-form-label">职位</label>
                        <div class="layui-input-block">
                            <select id="F_DutyId" name="F_DutyId" lay-verify="required" lay-search="">
                                <option value="">==请选择==</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-block">
                            <input id="F_RealName" name="F_RealName" type="text" lay-verify="required" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-block">
                            <select id="F_Gender" name="F_Gender" lay-verify="required">
                                <option value="true">男</option>
                                <option value="false">女</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">手机</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_MobilePhone" name="F_MobilePhone" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">生日</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_Birthday" name="F_Birthday" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">微信</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_WeChat" name="F_WeChat" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">邮箱</label>
                        <div class="layui-input-block">
                            <input type="text" id="F_Email" name="F_Email" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">高管</label>
                        <div class="layui-input-block">
                            <select id="F_IsSenior" name="F_IsSenior" lay-verify="required">
                                <option value="false">否</option>
                                <option value="true">是</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">部门主管</label>
                        <div class="layui-input-block">
                            <select id="F_IsLeaderInDepts" name="F_IsLeaderInDepts" lay-verify="required">
                                <option value="false">否</option>
                                <option value="true">是</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">类型</label>
                        <div class="layui-input-block">
                            <select id="F_IsAdministrator" name="F_IsSenior" lay-verify="required">
                                <option value="false">普通用户</option>
                                <option value="true">系统管理员</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-sm6 layui-hide">
                        <label class="layui-form-label">允许登录</label>
                        <div class="layui-input-block">
                            <select id="F_EnabledMark" name="F_IsLeaderInDepts" lay-verify="required">
                                <option value="true">是</option>
                                <option value="false">否</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <div class="layui-row layui-hide">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <textarea class="layui-textarea"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
